package cn.com.dcsgo.mapper;

import cn.com.dcsgo.model.activity.ActivityInfo;
import cn.com.dcsgo.model.activity.ActivityRule;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * <p>
 * 活动表 Mapper 接口
 * </p>
 *
 * @author Dcsgo
 * @since 2025-04-19
 */
@Repository
public interface ActivityInfoMapper extends BaseMapper<ActivityInfo> {

    List<Long> selectExistBySkuIds(@Param("skuIds") List<Long> skuIds);

    /**
     * 根据skuId查询活动规则
     *
     * @param skuId skuId
     * @return sku 关联的活动规则
     */
    List<ActivityRule> findActivityRuleListBySkuId(@Param("skuId") Long skuId);
}
